package com.daiyang.librarymanagementsystem2.controller_test;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
public class BeanConfig {
    //@Primary
    @Bean(name = {"u1","user1"})
    public User user1(){
        User user =new User("代阳",11);
        return user;
    }
    @Bean
    public User user2(){
        User user =new User("陶镓妮",88);
        return user;
    }
}
